-
-
Notifications
You must be signed in to change notification settings - Fork 434
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add openapi3 validator middleware #462
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmars
force-pushed
the
validator-middleware
branch
from
December 13, 2021 02:46
958837f
to
3a6247b
Compare
fenollp
requested changes
Dec 18, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! I thought I already reviewed this but either it got lost to the ether or I'm going mad. Or you know, both. Or neither...
cmars
force-pushed
the
validator-middleware
branch
5 times, most recently
from
December 19, 2021 18:29
5767aa6
to
4da2f3b
Compare
cmars
force-pushed
the
validator-middleware
branch
from
December 19, 2021 18:41
4da2f3b
to
5bc3612
Compare
@fenollp Thanks for the review! I believe I've addressed comments, open to discuss further. PTAL 🙏 |
This change introduces middleware which wraps an `http.Handler` with OpenAPI 3 request and response validation.
cmars
force-pushed
the
validator-middleware
branch
from
December 19, 2021 20:07
5bc3612
to
583fcf7
Compare
fenollp
approved these changes
Dec 20, 2021
QifanWuCFLT
added a commit
to confluentinc/kin-openapi
that referenced
this pull request
Apr 6, 2023
* add couple tests around multiple file-specs (one needs fixing) + some code reuse (getkin#236) * Fix wrong `Found unresolved ref` error when converting from Swagger/OpenAPIv2 spec (getkin#237) * various fixes mainly to openapi2<->openapi3 conversion (getkin#239) * Add deprecated field in Schema (getkin#242) Change-Id: If750ff340ae29cf24a6ad870071502c9327485ca * Fix openapi3.referencedDocumentPath (getkin#248) * follow lint rules (getkin#250) * Fix broken link to alternative projects (getkin#255) * openapi2 security scheme requires accessCode not accesscode (getkin#256) Signed-off-by: Pierre Fenoll <pierrefenoll@gmail.com> * Validator: check readOnly/writeOnly properties (getkin#246) * feat: add Goa to README (getkin#261) Goa v3 depend on kin-openapi https://github.com/goadesign/goa/blob/v3/go.mod * swagger2 formData & request body refs (getkin#260) Co-authored-by: Francis Lennon <francis.lennon@whitehatsec.com> * Add support for error aggregation for request/response validation (getkin#259) * Prevent a panic in the error encoder (getkin#262) * Adds ipv4 and ipv6 formats support (getkin#258) Co-authored-by: Pierre Fenoll <pierrefenoll@gmail.com> * validate pattern or schema, not pattern xor schema anymore (getkin#265) * Consumes request bodies (getkin#263) Co-authored-by: Francis Lennon <francis.lennon@whitehatsec.com> Co-authored-by: Pierre Fenoll <pierrefenoll@gmail.com> * fixed panic in path validation (issue getkin#264) (getkin#266) Co-authored-by: Samuel Monderer <samuelmo@radware.com> * Update doc.go (getkin#272) * Exposing Components 'IdentifierRegExp' to enable customized component key getkin#270 (getkin#273) * Add support for application/problem+json (getkin#275) Add support for content type application/problem+json for response validation * Enables jsonpointer support in openapi3 (getkin#276) * Fix flaky CI (getkin#278) * Fix failfast flag handling (getkin#284) * Add OIDC Schema format as per spec (getkin#287) Co-authored-by: Pierre Fenoll <pierrefenoll@gmail.com> * Support for alternate http auth mechanisms (getkin#291) Fixes getkin#290 * Return a more specific error when more than oneOf schemas match (getkin#292) * fix bug on indice to compare (getkin#295) * support extensions in oasv3.Server (getkin#302) Signed-off-by: Pierre Fenoll <pierrefenoll@gmail.com> * Add an example showing how to decode some extension props (getkin#304) * clarify defaults around openapi3filter.Options and openapi3filter.Aut… (getkin#305) Signed-off-by: Pierre Fenoll <pierrefenoll@gmail.com> * Add extensions in missing resources (getkin#306) * Enlarge support for JSON Path in $ref resolution (getkin#307) * Prevent infinite loop while loading openapi spec with recursive references (getkin#310) * nitpicks (getkin#313) * mention alternatives in README.md (getkin#315) Signed-off-by: Pierre Fenoll <pierrefenoll@gmail.com> * Bypass any file/URL reading by ReadFromURIFunc (getkin#316) * Drop `sl.LoadSwaggerFromURIFunc` (getkin#317) * Add an openapi3gen example + options (getkin#320) * Adds oneOf/discriminator/mapping management (getkin#321) * reproduce incorrect discriminator handling with ValidateRequest (getkin#323) * prepare for getkin#210 (getkin#325) * go:embed loader.ReadFromURIFunc example (getkin#319) * Rework router (getkin#210) * Reset compiledPattern when updating Pattern (getkin#327) * address getkin#326 (getkin#330) Signed-off-by: Pierre Fenoll <pierrefenoll@gmail.com> * Drop test dependency on go:embed (getkin#331) * Update README.md (getkin#333) * introduce openapi3filter.RegisteredBodyDecoder (getkin#340) Signed-off-by: Pierre Fenoll <pierrefenoll@gmail.com> * openapi3: allow variables in schemes in gorillamux router + better server variables validation (getkin#337) * Fix following refs to non-openapi3 root documents (but that are sub-documents) (getkin#346) * reproduce failing to load JSON refs in non-openapi document (getkin#314) * repro getkin#341 (getkin#342) * [Bugfix] fail readURL on http code > 399 (getkin#345) * [Bugfix] fail readUR if external reference returned http code > 399 * Replaced httpmock with httptest * Use require.EqualError instead testing Error and Contains of the errormessage * Test LoadSwaggerFromData as well * Support loading documents with `filepath.FromSlash` (getkin#251) * [Bugfix] fixed error message when only file is referenced (getkin#348) without internal reference * Follow callbacks references (getkin#347) * CI: test go1.14 (getkin#349) * Clean APIs from trademarked name "Swagger" (getkin#351) * Fix CI (getkin#352) Signed-off-by: Pierre Fenoll <pierrefenoll@gmail.com> * cannot reproduce getkin#353 (getkin#354) Signed-off-by: Pierre Fenoll <pierrefenoll@gmail.com> * add example usage of request validation with gorilla/mux router (getkin#359) Signed-off-by: Pierre Fenoll <pierrefenoll@gmail.com> * Have Header Object follow the structure of the Parameter Object (getkin#355) * CI: fix tests after tag (getkin#363) Signed-off-by: Pierre Fenoll <pierrefenoll@gmail.com> * Update openapi2_conv.go (getkin#365) Co-authored-by: Pierre Fenoll <pierrefenoll@gmail.com> * update that tag again... (getkin#374) * fix drilling down struct looking for additionalProperties (getkin#377) * fix drilling down additionalProperties in the boolean case (getkin#378) * Compile pattern on validate (getkin#375) Co-authored-by: Pierre Fenoll <pierrefenoll@gmail.com> * Add uint type to openapi3gen (getkin#379) * reproduce and fix issue getkin#382 (getkin#383) * Detect if a field is anonymous and handle the indirection (getkin#386) * Add missing yaml tags in marshaling openapi2.T (getkin#391) * Support reference cycles (getkin#393) * Add support for embedded struct pointers (getkin#396) * fix: Allow encoded path parameters with slashes (getkin#400) * Accept multipart/form-data's part without Content-Type (getkin#399) * fix that CI go:embed test forever, again (getkin#405) * fix bad ci script. I was under the impression this was working when I… (getkin#406) * Fix handling recursive refs (getkin#403) * fix issue 407, where if server URL has no path it throws exception (getkin#408) Co-authored-by: Naer Chang <naer_chang@mcafee.com> * feature: Add more discriminator error messages and return specific er… (getkin#394) * feature: Add more discriminator error messages and return specific error when possible * feature: Always show more specific error message * test: Add schema oneOf tests * clean: Add missing word * Add nomad to list of projects using kin-openapi in README (getkin#413) * Schema customization plug-point (getkin#411) * Update README: remove github.com/getkin/kin (getkin#414) * fix alters by LGTM.com (getkin#415) * Add support for "application/x-yaml" (getkin#421) * sort out possible mishandling of ipv4 vs v6 (getkin#431) * Panic with customizer and embedded structs (getkin#434) * Fix getkin#422 added support for error unwrapping for errors with a single sub-error (getkin#433) * Do not escape regular expressions again (getkin#429) (getkin#435) * improve response validation error (getkin#437) * Define const schema types (getkin#438) * reproduce issue getkin#436 (getkin#439) * Fix scheme handling in v2->v3 conversion (getkin#441) * reproduce + fix getkin#444: ValidateRequest for application/x-yaml (getkin#445) * Internalize references (getkin#443) * ClientCredentials conversion to OpenAPI v2 (getkin#449) * Fix issue getkin#410 (getkin#450) Co-authored-by: Pierre Fenoll <pierrefenoll@gmail.com> * try reproducing getkin#447 (getkin#448) * fix: duplicate error reason when parameter is required but not present (getkin#453) * Provide support for generating recursive types into OpenAPI doc getkin#451 + my touches (getkin#454) Co-authored-by: Peter Broadhurst <peter.broadhurst@kaleido.io> * v2Tov3: handle parameter schema refs (getkin#455) Co-authored-by: Vincent Behar <v.behar@free.fr> * nitpicking: use type openapi3.Schemas (getkin#456) * Create FUNDING.yml (getkin#458) * Insert produces field (getkin#461) * fix error reason typo (getkin#466) * Update rfc422 regex as per spec: 'case insensitive on input' (getkin#463) * work around localhost host mismatch with relative server url (getkin#467) Co-authored-by: Chris Rodwell <crodwell@mediamath.com> * Add openapi3 validator middleware (getkin#462) * document union behaviour of XyzRef.s (getkin#468) * extensible-paths (getkin#470) * fix recipe for validating http requests/responses (getkin#474) * amend README.md to reflect BodyDecoder type (getkin#475) * openapi2conv: Convert response headers (getkin#483) * Fix oauth2 in openapi2conv.FromV3SecurityScheme (getkin#491) * Fix openapi3 validation: path param must be required (getkin#490) * updated date-time string format regexp to fully comply to standard (getkin#493) * distinguish form data in fromV3RequestBodies (getkin#494) * feat: cache resolved refs, improve URI reader extensibility (getkin#469) * Fix OpenAPI 3 validation: request body content is required (getkin#498) * Add OpenAPI 3 externalDocs validation (getkin#497) * issue/500 (getkin#501) Co-authored-by: Nathaniel J Cochran <nathanjcochran@gmail.com> * Fix OpenAPI 3 validation: operationId must be unique (getkin#504) * Check response headers and links (getkin#505) Co-authored-by: Ole Petersen <ole.petersen@qaware.de> Co-authored-by: Pierre Fenoll <pierrefenoll@gmail.com> * fix that test situation (getkin#506) * Define missing XML in schema, minor fixes and doc additions (getkin#508) * discriminator value should verify the type is string to avoid panic (getkin#509) * Add nilness check to CI (getkin#510) * Add support for formats defined in JSON Draft 2019-09 (getkin#512) Co-authored-by: Steve Lessard <steve.lessard@teradata.com> * Change the order of request validation to validate the Security schemas first before all other paramters (getkin#514) Co-authored-by: yarne <yarne@otainsight.com> * Add support for allowEmptyValue (getkin#515) Co-authored-by: Pierre Fenoll <pierrefenoll@gmail.com> * RequestError Error() does not include reason if it is the same as err (getkin#517) Co-authored-by: Kanda <kanda@synctera.com> * Fix ExampleValidator test for 32-bit architectures (getkin#516) * openapi2: add missing schemes field of operation object (getkin#519) * Run CI tests on 386 too cc getkin#516 (getkin#518) * Add ExcludeSchema sentinel error for schemaCustomizer (getkin#522) Co-authored-by: Pierre Fenoll <pierrefenoll@gmail.com> * test link refs (getkin#525) * add missing validation of components: examples, links, callbacks (getkin#526) * openapi2: remove undefined tag (getkin#527) * testing: fix incorrect document (getkin#529) * testing: compare graphs using graph tools (getkin#528) * Fix some golints (getkin#530) * Internalize parameter references in the path as well (getkin#540) * fix bad error message on invalid value parse on query parameter (getkin#541) Co-authored-by: Kanda <kanda@synctera.com> * Follow up to getkin#540 with more tests (getkin#549) * feat: handling `default` in request body and parameter schema (getkin#544) * wip setting defaults for getkin#206 Signed-off-by: Pierre Fenoll <pierrefenoll@gmail.com> * introduce body encoders Signed-off-by: Pierre Fenoll <pierrefenoll@gmail.com> * re-encode only when needed Signed-off-by: Pierre Fenoll <pierrefenoll@gmail.com> * set default for parameter and add more test cases Co-authored-by: Pierre Fenoll <pierrefenoll@gmail.com> * following up on getkin#544: do not pass through on unhandled case (getkin#550) * Fix for CVE-2022-28948 (getkin#552) * CI: check-goimports Signed-off-by: Pierre Fenoll <pierrefenoll@gmail.com> * reorder imports per new CI check Signed-off-by: Pierre Fenoll <pierrefenoll@gmail.com> * switch from github.com/ghodss/yaml to github.com/invopop/yaml Signed-off-by: Pierre Fenoll <pierrefenoll@gmail.com> * remove all direct dependencies on gopkg.in/yaml.v2 Signed-off-by: Pierre Fenoll <pierrefenoll@gmail.com> * upgrade gopkg.in/yaml.v2 to latest published tag Signed-off-by: Pierre Fenoll <pierrefenoll@gmail.com> * upgrade gopkg.in/yaml.v3 to latest published tag Signed-off-by: Pierre Fenoll <pierrefenoll@gmail.com> * TestIssue430: fix racey behavior (getkin#553) * Handle port number variable of servers given to gorillamux.NewRouter (getkin#524) * update README.md with newer router/validator example (getkin#554) * Unit tests (getkin#556) * add gitlab.com/jamietanna/httptest-openapi to README.md (getkin#557) * fix: add deprecated field to openapi2.Operation (getkin#559) * fix: openapi2conv respects produces field (getkin#575) * Use go1.19 formatting (getkin#584) * Fix `resolveSchemaRef()` to load correctly an other spec. file referenced by `$ref` (getkin#583) * Protect from recursion in openapi3.InternaliseRefs (getkin#578) Co-authored-by: Dmitriy Lukiyanchuk <dmitriy.lukiyanchuk@instamart.ru> * cleanup after getkin#583 (getkin#585) * upgrade CI tools (getkin#586) * getkin#482 integer support broken with yaml (getkin#577) Co-authored-by: Christian Boitel <cboitel@lfdj.com> * Match on overridden servers at the path level, fixes getkin#564 (getkin#565) Co-authored-by: Pierre Fenoll <pierrefenoll@gmail.com> * feat: support validation options specifically for disabling pattern validation (getkin#590) * Add sponsor logo (getkin#595) * Examples validation (getkin#592) Co-authored-by: Pierre Fenoll <pierrefenoll@gmail.com> * use %w to wrap the errors (getkin#596) * Expose request/response validation options in the middleware Validator (getkin#608) * fix: detects circular references that can't be handled at the moment to avoid infinite loops loading documents (getkin#607) * Validate default values against schema (getkin#610) * fix: only inject default value for matched oneOf or anyOf (getkin#604) * Deterministic validation (getkin#602) * Improve error message when path validation fails (getkin#605) * Correctly resolve path of yaml resource if double referenced. (getkin#611) * Fix second level relative ref in property resolving (getkin#622) Co-authored-by: Dmitriy Lukiyanchuk <dmitriy.lukiyanchuk@instamart.ru> * rework convertError Example code to show query schema error (getkin#626) * Allow validations options when creating legace Router (getkin#614) * Additional error information (getkin#617) * Add SIMITGROUP`s repo to dependants shortlist (getkin#627) * Introduce package-wide CircularReferenceCounter to work around getkin#615 (getkin#628) Co-authored-by: sorintm <sorin@xata.io> * fix: embedded struct handling (getkin#630) * openapi3filter: Fallback to string when decoding request parameters (getkin#631) * Introduce `(openapi3.*Server).BasePath()` and `(openapi3.Servers).BasePath()` (getkin#633) * Actually getkin#624, thanks to @orensolo (getkin#634) * Check for superfluous trailing whitespace (getkin#636) * show errors in security requirements (getkin#637) * Fix validation of complex enum values (getkin#647) * readOnly writeOnly validation (getkin#599) * fix: yaml marshal output (getkin#649) * openapi3filter: add missing response headers validation (getkin#650) * Fix lost error types in oneOf (getkin#658) * Add RegisterBodyEncoder (getkin#656) * fix panic slice out of range error getkin#652 (getkin#654) * Fixed recurive reference resolving when property referencies local co… (getkin#660) Co-authored-by: Anton Tolokan <anton.tolokan@sbermarket.ru> * Add CodeQL workflow for GitHub code scanning (getkin#661) Co-authored-by: LGTM Migrator <lgtm-migrator@users.noreply.github.com> * Support x-nullable (getkin#670) * Update content length after replacing request body (getkin#672) * fix: optional defaults (getkin#662) * fix: wrap the error that came back from the callback (getkin#674) (getkin#675) * fix: openapi3.SchemaError message customize (getkin#678) (getkin#679) Co-authored-by: Pierre Fenoll <pierrefenoll@gmail.com> * openapi3filter: fix crash when given arrays of objects as query parameters (getkin#664) * fix: error path is lost (getkin#681) (getkin#682) * feat: formatting some error messages (getkin#684) * fix: query param pattern (getkin#665) * fix: errors in oneOf not contain path (getkin#676) (getkin#677) * fix tests after merge train (getkin#686) * Internalize recursive external references getkin#618 (getkin#655) * Add variadic options to Validate method (getkin#692) * fix: setting defaults for oneOf and anyOf (getkin#690) * Try decoding as JSON first then YAML, for speed (getkin#693) Fixes getkin#680 * Use and update GetBody() member of request (getkin#704) * Bugfix/issue638 (getkin#700) * Add json patch support (getkin#702) * openapi3filter: Include schema ref or title in response body validation errors (getkin#699) Co-authored-by: Steve Lessard <steve.lessard@teradata.com> * openapi3filter: parse integers with strconv.ParseInt instead of ParseFloat (getkin#711) Co-authored-by: Steve Lessard <steve.lessard@teradata.com> * Fix inconsistent processing of server variables in gorillamux router (getkin#705) Co-authored-by: Steve Lessard <steve.lessard@teradata.com> * Fix links to OpenAPI spec after GitHub changes (getkin#714) * openapi3: patch YAML serialization of dates (getkin#698) Co-authored-by: Pierre Fenoll <pierrefenoll@gmail.com> * Leave allocation capacity guessing to the runtime (getkin#716) * openapi3filter: validate non-string headers (getkin#712) Co-authored-by: Steve Lessard <steve.lessard@teradata.com> * openapi3: unexport ValidationOptions fields and add some more (getkin#717) * openapi3: introduce (Paths).InMatchingOrder() paths iterator (getkin#719) * feat: improve error reporting for bad/missing discriminator (getkin#718) * openapi3: continue validation on valid oneOf properties (getkin#721) * openapi3filter: use option to skip setting defaults on validation (getkin#708) * openapi3: remove email string format (getkin#727) * openapi3filter: support for allOf request schema in multipart/form-data (getkin#729) fix getkin#722 * Disallow unexpected fields in validation and drop `jsoninfo` package (getkin#728) Fixes getkin#513 Fixes getkin#37 * openapi3filter: RegisterBodyDecoder for application/zip (getkin#730) * Keep track of API changes with CI (getkin#732) * openapi3filter: RegisterBodyDecoder for text/csv (getkin#734) fix getkin#696 * getkin#741 uri cache mutex (getkin#742) * Specify UseNumber() in the JSON decoder during JSON validation (getkin#738) * openapi3: fix error phrase in security scheme (getkin#745) Co-authored-by: Pierre Fenoll <pierrefenoll@gmail.com> * openapi3: remove value data from `SchemaError.Reason` field (getkin#737) Resolves getkin#735 * fix additional properties false not validated (getkin#747) * Refine schema error reason message (getkin#748) * openapi3: fix validation of non-empty interface slice value against array schema (getkin#752) Resolves getkin#751 * openapi3: empty scopes are valid (getkin#754) * openapi3: fix integer enum schema validation after json.Number PR (getkin#755) * optional readOnly and writeOnly validations (getkin#758) * openapi3: fix resolving Callbacks (getkin#757) Co-authored-by: Pierre Fenoll <pierrefenoll@gmail.com> fix getkin#341 * fixup some coding style divergences (getkin#760) * openapi3: make `bad data ...` error more actionable (getkin#761) * openapi3: add test from getkin#731 showing validating doc first is required (getkin#762) closes getkin#731 * cmd/validate: more expressive errors (getkin#769) * openapi3: fix an infinite loop that may have been introduced in getkin#700 (getkin#768) * openapi3: fix default values count even when disabled (getkin#767) (getkin#770) * openapi3: sort extra fields only once, during deserialization (getkin#773) * feat: support nil uuid (getkin#778) --------- Signed-off-by: Pierre Fenoll <pierrefenoll@gmail.com> Co-authored-by: Pierre Fenoll <pierrefenoll@gmail.com> Co-authored-by: Tevic <tevic.tt@gmail.com> Co-authored-by: Kaushal Madappa <kshlmster@gmail.com> Co-authored-by: Kevin Disneur <kevin@disneur.me> Co-authored-by: 森 優太 <59682979+uta-mori@users.noreply.github.com> Co-authored-by: FrancisLennon17 <Francislennon17@gmail.com> Co-authored-by: Francis Lennon <francis.lennon@whitehatsec.com> Co-authored-by: Zachary Lozano <zacharylozano@invisionapp.com> Co-authored-by: Richard Rance <lagerenas@gmail.com> Co-authored-by: Riccardo Manfrin <RiccardoManfrin@users.noreply.github.com> Co-authored-by: Samuel Monderer <schmilmonderer@gmail.com> Co-authored-by: Samuel Monderer <samuelmo@radware.com> Co-authored-by: duohedron <40067856+duohedron@users.noreply.github.com> Co-authored-by: heyvister <41934916+heyvister@users.noreply.github.com> Co-authored-by: DanielXu77 <52269333+DanielXu77@users.noreply.github.com> Co-authored-by: Gordon Allott <gordallott@gmail.com> Co-authored-by: Michael Krotscheck <krotscheck@gmail.com> Co-authored-by: Jake Scott <jake@jakethesnake.dev> Co-authored-by: C H <cyrille.hemidy@gmail.com> Co-authored-by: Sergi Castro <sergikstro@gmail.com> Co-authored-by: hottestseason <hottestseason@gmail.com> Co-authored-by: Reuven Harrison <rh@tufin.com> Co-authored-by: Steffen Rumpf <39158011+steffakasid@users.noreply.github.com> Co-authored-by: jasmanx11 <61581398+jasmanx11@users.noreply.github.com> Co-authored-by: Alexander Bolgov <49677698+alexanderbolgov-ef@users.noreply.github.com> Co-authored-by: bianca rosa <me@biancarosa.com.br> Co-authored-by: Derek Strickland <1111455+DerekStrickland@users.noreply.github.com> Co-authored-by: Rodrigo Fernandes <rtfrodrigo@gmail.com> Co-authored-by: stakme <stak.me.g@gmail.com> Co-authored-by: NaerChang2 <naer_chang@yahoo.ca> Co-authored-by: Naer Chang <naer_chang@mcafee.com> Co-authored-by: Peter Broadhurst <peter.broadhurst@kaleido.io> Co-authored-by: Oleksandr Redko <oleksandr.red+github@gmail.com> Co-authored-by: Guilherme Cardoso <gjc@ua.pt> Co-authored-by: Bion <520596+bionoren@users.noreply.github.com> Co-authored-by: José María Martín Luque <jmmartinluque@gmail.com> Co-authored-by: David Sharnoff <github@dave.sharnoff.org> Co-authored-by: Mansur Marvanov <nanorobocop@gmail.com> Co-authored-by: jhwz <52683873+jhwz@users.noreply.github.com> Co-authored-by: Luukvdm <luuk.vdm@hotmail.com> Co-authored-by: Andrey Dyatlov <adyatlov@posteo.net> Co-authored-by: Nick Ufer <nick@ufer.dev> Co-authored-by: Vincent Behar <v.behar@free.fr> Co-authored-by: Matteo Pietro Dazzi <matteopietro.dazzi@gmail.com> Co-authored-by: Karl Möller <93589605+karl-dau@users.noreply.github.com> Co-authored-by: Chris Rodwell <crodwell@mediamath.com> Co-authored-by: Casey Marshall <cmars@users.noreply.github.com> Co-authored-by: general-kroll-4-life <82620104+general-kroll-4-life@users.noreply.github.com> Co-authored-by: Andreas Paul <xorpaul@gmail.com> Co-authored-by: Sergey Vilgelm <sergey@vilgelm.com> Co-authored-by: Clifton Kaznocha <ckaznocha@gmail.com> Co-authored-by: Vasiliy Tsybenko <VasayXTX@gmail.com> Co-authored-by: Anthony Clerc <21290922+Cr4psy@users.noreply.github.com> Co-authored-by: Nathan Cochran <cochran@niche.com> Co-authored-by: Nathaniel J Cochran <nathanjcochran@gmail.com> Co-authored-by: Ole Petersen <56505957+peteole@users.noreply.github.com> Co-authored-by: Ole Petersen <ole.petersen@qaware.de> Co-authored-by: K Zhang <kandazhang@gmail.com> Co-authored-by: slessard <slessard@users.noreply.github.com> Co-authored-by: Steve Lessard <steve.lessard@teradata.com> Co-authored-by: Yarne Decuyper <yarne@decuyper.info> Co-authored-by: yarne <yarne@otainsight.com> Co-authored-by: Kanda <kanda@synctera.com> Co-authored-by: Anthony Fok <anthony.fok@canada.ca> Co-authored-by: Nicko Guyer <nguyer@users.noreply.github.com> Co-authored-by: Christoph Petrausch <263448+hikhvar@users.noreply.github.com> Co-authored-by: Nic <qianyong@api7.ai> Co-authored-by: Idan Frimark <40820488+FrimIdan@users.noreply.github.com> Co-authored-by: Nir <35661734+nirhaas@users.noreply.github.com> Co-authored-by: Masumi Kanai <masumi.net@gmail.com> Co-authored-by: wtertius <wtertius@gmail.com> Co-authored-by: Dmitriy Lukiyanchuk <dmitriy.lukiyanchuk@instamart.ru> Co-authored-by: Christian Boitel <40855349+cboitel@users.noreply.github.com> Co-authored-by: Christian Boitel <cboitel@lfdj.com> Co-authored-by: Amarjeet Rai <sonu27@users.noreply.github.com> Co-authored-by: Tristan Cartledge <108070248+TristanSpeakEasy@users.noreply.github.com> Co-authored-by: danicc097 <71724149+danicc097@users.noreply.github.com> Co-authored-by: sorintm <112782063+sorintm@users.noreply.github.com> Co-authored-by: Praneet Loke <1466314+praneetloke@users.noreply.github.com> Co-authored-by: Davor Sauer <davor.sauer@gmail.com> Co-authored-by: Yannick Clybouw <yannick.clybouw@otainsight.com> Co-authored-by: sorintm <sorin@xata.io> Co-authored-by: Nicholas Wiersma <nick@wiersma.co.za> Co-authored-by: Steven Hartland <steven.hartland@multiplay.co.uk> Co-authored-by: Stepan I <2688692+micronull@users.noreply.github.com> Co-authored-by: Omar Ramadan <omar.ramadan93@gmail.com> Co-authored-by: nk2ge5k <nk2ge5k@gmail.com> Co-authored-by: Derbylock <derbylock@gmail.com> Co-authored-by: Anton Tolokan <anton.tolokan@sbermarket.ru> Co-authored-by: lgtm-com[bot] <43144390+lgtm-com[bot]@users.noreply.github.com> Co-authored-by: LGTM Migrator <lgtm-migrator@users.noreply.github.com> Co-authored-by: Chris Reeves <hey@krak3n.io> Co-authored-by: Andriy Borodiychuk <ab@markusweb.com> Co-authored-by: orensolo <46680749+orensolo@users.noreply.github.com> Co-authored-by: Stepan I <micronullist@gmail.com> Co-authored-by: Eloy Coto <eloy.coto@gmail.com> Co-authored-by: tomato0111 <119634480+tomato0111@users.noreply.github.com> Co-authored-by: ShouheiNishi <96609867+ShouheiNishi@users.noreply.github.com> Co-authored-by: Cosmos Nicolaou <cosmos.nicolaou@gmail.com> Co-authored-by: Greg Ward <greg@gerg.ca> Co-authored-by: Vincent Le Goff <vince.legoff@gmail.com> Co-authored-by: Katsumi Kato <k2tzumi@users.noreply.github.com> Co-authored-by: Graham Crowell <grahamcrowell@users.noreply.github.com> Co-authored-by: Jeffrey Ying <jeffrey.ying86@live.com> Co-authored-by: Ori Shalom <ori-shalom@users.noreply.github.com> Co-authored-by: Andrew Yang <andrewyang96@gmail.com> Co-authored-by: Nodar Jarrar <36896519+nodar963@users.noreply.github.com> Co-authored-by: orshlom <44160965+orshlom@users.noreply.github.com> Co-authored-by: Vincent Le Goff <vincent.legoff@konghq.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change introduces middleware which wraps an
http.Handler
with OpenAPI 3 request and response validation.In developing this middleware, I thought it would benefit others trying to do the same. This is my first time contributing here, happy to answer any questions and discuss further.
Thank you for such an awesome OpenAPI library by the way!